package com.daiqee.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.daiqee.pojo.SupplierArchives;
import com.daiqee.dao.mapper.SupplierArchivesMapper;

/**
 * 供应商档案
 * 
 * <br/>
 * @since JDK 1.8
 * @version  V2.1
 * @author RichardTang 
 * @date: 2018年5月8日 上午8:28:43
 * @package com.daiqee.service.impl
 * @copyright:Copyright (c) 2018, 1245811923@qq.com All Rights Reserved.
 */
@Service
public class SuppllierArchivesService extends ServiceImpl<SupplierArchivesMapper, SupplierArchives> {

	@Autowired
	private SupplierArchivesMapper	supplierArchivesMapper;
	
	/**
	 * 根据供应商的等级(lv)和分类(class)来查询
	 * @author RichardTang
	 * @since 2.1
	 * @version 2.1
	 * @Time 2018年4月6日20:53:05
	 * @param sLv
	 * 			查询的供应商id号
	 * @param sClass
	 * 			查询的供应商分类号
	 * @return 符合条件的供应商
	 */
	public List<SupplierArchives> querySupplierArchivesByLvAndClass(String sLv, String sClass) {
		List<SupplierArchives> supplierArchivesList = supplierArchivesMapper.selectList(
				new EntityWrapper<SupplierArchives>().eq("sup_archi_customer_lv", sLv)
				.and().eq("sup_archi_customer_class", sClass)
		);
		return supplierArchivesList;
	}

}
